

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<script type="text/javascript" src="helpman_topicinit.js"></script>

<title>Reverse Engineering [Enterprise Architect User Guide]</title>

<meta name="keywords" content="Enterprise Architect, Sparx Systems, UML, Code Engineering,Code Engineering Reverse Engineer Source Code,Code Engineering Code, Reverse Engineer,Code Engineering Synchronization,Reverse Engineer,Reverse Engineer Source Code,Synchronization,Synchronization Of Source Code And Model,Source Code,Source Code Reverse Engineer,Source Code Synchronize">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta http-equiv="Content-Style-Type" content="text/css" />

<link type="text/css" href="default.css" rel="stylesheet" />
<style type="text/css">
  A, A:Visited
  {
    color: #00F;
  }

  A:Active, A:Hover
  {
    color: #F00;
  }

  OL
  {
    margin: 5px 0 5px 48px;
  }

  UL
  {
    margin-bottom: 3px;
    margin-top: 0;
  }

  #nsr
  {
    background-color: #D4DFFF;
  }

  #nsr A
  {
    text-decoration: none;
  }

  #mainbody
  {
    padding: 8px;
  }

  .p_BodyText
  {
    padding: 5px 0;
  }
</style>



<style type="text/css" media="screen">
  BODY
  {
    background-color: #FFFFFF;
  }

  #nsr
  {
    padding: 6px 6px 0 6px;
    border-bottom: none;
    vertical-align: top;
    z-index: 2;
    visibility: visible;
    left: 0;
    top: 0;
    position: absolute;
  }

  #mainbody
  {
    left: 0;
    top: 0;
    margin: 0;
    position: absolute;
    padding: 10px;
    overflow: auto;
    height: 100%;
    z-index: 1;
    background-repeat: no-repeat;
    background-position: bottom right;
    background-attachment: fixed;
  }
</style>

<style type="text/css" media="print">
  #nsr
  {
    visibility: none;
  }

  #mainbody
  {
    overflow: visible;
  }
</style>
<script type="text/javascript" language="JavaScript" src="nonscroll.js"></script>

</head>
<body scroll="no">

<div id="page">



        <div id="content">
          <div id="content-inner">
          



  
          <div id="nsr">
            <table border="0" cellspacing="0" cellpadding="4" width="100%">
              <tr valign="top">
                <td align="left">
  


                  <p class="p_Heading1"><span class="f_Heading1">Reverse Engineering</span></p>



  
                </td>
                <td align="right">
                  <a href="introduction.htm" onmouseover="document.images.main.src='button_main_h.gif'" onmouseout="document.images.main.src='button_main.gif'">
                    <img name="main" src="button_main.gif" border=0 alt="Return to Introduction">
                  </a>&nbsp;
    
                  <a href="codeengineering.htm" onmouseover="document.images.prev.src='button_prev_h.gif'" onmouseout="document.images.prev.src='button_prev.gif'">
                    <img name=prev src="button_prev.gif" border=0 alt="Previous page" />
                  </a>&nbsp;
    
    
    
                  <a href="o316.htm" onmouseover="document.images.next.src='button_next_h.gif'" onmouseout="document.images.next.src='button_next.gif'">
                    <img name=next src="button_next.gif" border=0 alt="Next page" />
                  </a>
    
    
                </td>
              </tr>
            </table>
          </div>
          <div id="mainbody">
  


                <p class="p_TextIndentedL1"><img src="reverse_engineering_and_synchronizing.png" width="480" height="100" border="0" alt="reverse_engineering_and_synchronizing"></p>
<p class="p_BodyText"><span class="f_BodyText">Reverse Engineering in Enterprise Architect enables you to import existing source code from a variety of code languages into a UML model. Existing source code structures are mapped into their UML representations, for example a Java Class is mapped into a UML Class element with the variables being defined as attributes, methods are modeled as operations and the interactions between the Java Classes being displayed in the UML model Class diagram with the appropriate connectors.</span></p>
<p class="p_BodyText"><span class="f_BodyText">Reverse Engineering enables users to examine legacy code and examine the functionality of code libraries for reuse or to bring the UML model up to date with the code that has been developed as part of a process called </span><span class="f_BodyText" style="font-style: italic;">synchronization</span><span class="f_BodyText">. Examining the code in a UML model enables user to identify the critical modules contained the code, enabling a starting point for understanding of the business and system requirements of the pre-existing system and to enable the developers to gain a better overall understanding of the source code.</span></p>
<p class="p_BodyText"><span class="f_BodyText">To begin the process of importing existing code into Enterprise Architect, an existing source of code must be <a href="o316.htm">imported into Enterprise Architect</a>, which can be a single directory or a <a href="revengtree.htm">directory structure</a>. Several options are available when performing the reverse engineering process. The </span><span class="f_BodyText" style="font-style: italic;"><a href="cgo_codegen.htm">Source Code Engineering Options</a></span><span class="f_BodyText"> topic contains several options that affect the reverse engineering process. These include:</span></p>
<ul style="text-indent: 0px; margin-left: 30px; list-style-position: outside;">
<li><span class="f_Bulletlist1">If comments are reverse engineered into notes fields, and how they are formatted if they are</span></li>
<li><span class="f_Bulletlist1">How property methods are recognized</span></li>
<li><span class="f_Bulletlist1">If dependencies should be created for operation return and parameter types.</span></li>
</ul>
<p class="p_BodyText"><span class="f_BodyText">It is important to note that when a legacy system is not well designed, simply importing the source into Enterprise Architect does not create an easily understandable UML model. When working with a legacy system that is poorly designed it is useful to break down the code into manageable components by examining the code elements individually. This can be achieved by importing a specific Class of interest into a diagram and then <a href="insertrelatedelements.htm">inserting the related elements</a> at one level to determine immediate relationship to other Classes. From this point it is possible to create Use Cases that identify the interaction between the legacy Classes, enabling an overview of the legacy system's operation.</span></p>
<p class="p_BodyText"><span class="f_BodyText">Copyright ownership is an important issue to take into account when undertaking the process of reverse engineering. In some cases, software might have specific limitations that prohibit the process of reverse engineering. It is important that a user address the issue of copyright before beginning the process of reverse engineering code. Situations that typically lend themselves to reverse engineering source code include source code that:</span></p>
<ul style="text-indent: 0px; margin-left: 30px; list-style-position: outside;">
<li><span class="f_Bulletlist1">You have already developed</span></li>
<li><span class="f_Bulletlist1">Is part of a third-party library that you have obtained permission to use</span></li>
<li><span class="f_Bulletlist1">Is part of a framework that your organization uses</span></li>
<li><span class="f_Bulletlist1">Is being developed on a daily basis by your developers.</span></li>
</ul>
<p class="p_BodyText"><span class="f_BodyText">Enterprise Architect currently supports reverse engineering in the following programming languages:</span></p>
<ul style="text-indent: 0px; margin-left: 30px; list-style-position: outside;">
<li><span class="f_Bulletlist1"><a href="actionscript_conventions.htm">ActionScript</a></span></li>
<li><span class="f_Bulletlist1"><a href="ada_2005.htm">ADA 2005</a> (Systems Engineering and Ultimate editions)</span></li>
<li><span class="f_Bulletlist1"><a href="c_conventions.htm">C</a></span></li>
<li><span class="f_Bulletlist1"><a href="csharp_conventions.htm">C#</a></span></li>
<li><span class="f_Bulletlist1"><a href="cpp_conventions.htm">C++</a></span></li>
<li><span class="f_Bulletlist1"><a href="delphi_conventions.htm">Delphi</a></span></li>
<li><span class="f_Bulletlist1"><a href="java_conventions.htm">Java</a></span></li>
<li><span class="f_Bulletlist1"><a href="php_conventions.htm">PHP</a></span></li>
<li><span class="f_Bulletlist1"><a href="python_conventions.htm">Python</a></span></li>
<li><span class="f_Bulletlist1"><a href="system_c_conventions.htm">SystemC</a> (Systems Engineering and Ultimate editions)</span></li>
<li><span class="f_Bulletlist1"><a href="verilogconventions.htm">Verilog</a> (Systems Engineering and Ultimate editions)</span></li>
<li><span class="f_Bulletlist1"><a href="vhdl_conventions.htm">VHDL</a> (Systems Engineering and Ultimate editions)</span></li>
<li><span class="f_Bulletlist1"><a href="visual_basic_conventions.htm">Visual Basic</a></span></li>
<li><span class="f_Bulletlist1"><a href="vbnet_conventions.htm">Visual Basic .NET</a></span></li>
</ul>
<p class="p_BodyText"><span class="f_BodyText">Enterprise Architect is also able to reverse engineer certain types of binary files: Java .jar files and .NET PE files. See </span><span class="f_BodyText"><a href="importbinary.htm">Import Binary Module</a></span><span class="f_BodyText"> for more information.</span></p>
<div style="text-align: left; text-indent: 0px; padding: 0px 0px 0px 0px; margin: 5px 0px 5px 13px;"><table cellspacing="0" cellpadding="2" border="0" style="border: none; border-spacing:0px;">
<tr style="text-align:left;vertical-align:bottom;">
<td valign="bottom" width="952" bgcolor="#efeff7" style="width:952px; background-color:#efeff7;"><p class="p_TiporNote" style="border-top: none; border-right: none; border-left: none;"><span class="f_TiporNote">Notes:</span></p>
</td>
</tr>
<tr style="text-align:left;">
<td width="952" bgcolor="#f7f7ff" style="width:952px; background-color:#f7f7ff;"><ul style="text-indent: 0px; margin-left: 14px; list-style-position: outside;">
<li><span class="f_TiporNoteText">Reverse Engineering of other languages is currently available through the use of MDG Technologies from <a href="http://sparxsystems.com/resources/mdg_tech/" target="_blank" class="weblink">www.sparxsystems.com/resources/mdg_tech/</a>.</span></li>
<li><span class="f_TiporNoteText">In the </span><span class="f_TiporNoteText">Corporate, Business and Software Engineering, System Engineering and Ultimate editions</span><span class="f_TiporNoteText"> of Enterprise Architect, if security is enabled you must have </span><span class="f_TiporNoteText" style="font-weight: bold;"><a href="permissionlist.htm">Reverse Engineer From DDL And Source Code</a></span><span class="f_TiporNoteText"> permission to reverse engineer source code and synchronize model elements against code.</span></li>
</ul>
</td>
</tr>
</table>
</div>




            </div>
          </div>
        </div>



</div>


</body>
</html>
